﻿using System;
using System.Diagnostics;
using System.Linq;
using Torrenter.Manager.Services;

namespace UpdateDB
{
    public class Program
    {
        static void Main(string[] args)
        {
            try
            {
                if (Process.GetProcessesByName("Torrenter.Client.Main").Count() > 0)
                {
                    return;
                }

                //get the torrents from the file
                var manager = TorrentManager.Instance;
                manager.TryUpdateNewTorrents();
            }
            catch (Exception)
            {
                    
            }
            

        }
    }
}
